#region Microsoft Public License
/*
 * (c) Copyright Chenjun Wu. http://utablesdk.codeplex.com
 * 
 * This source is subject to the Microsoft Public License (Ms-PL).
 * Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
 * All other rights reserved.
 */
#endregion

﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using UTable.Input;
using UTable.Input.MultiTouch;
using UTable.Objects;
using UTable.Objects.Controls;

namespace UTable.Tests
{
	/// <summary>
	/// Interaction logic for UPieViewTest.xaml
	/// </summary>
	public partial class UScanViewTest : UObject
	{
		public UScanViewTest()
		{
			InitializeComponent();
		}

		private void ItemSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
		{
			if (this.ScanView != null)
			{
				int index = (int)ItemSlider.Value;
				ScanView.JumpTo(index);
			}
		}

		private void DirectionBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
		{
			if (this.ScanView != null)
			{
				if (DirectionBox.SelectedIndex == 0)
					ScanView.TurnDirection = UScanViewTurnDirectionType.LeftRight;
				else
					ScanView.TurnDirection = UScanViewTurnDirectionType.TopDown;
			}
		}
	}
}
